package errcode

type ErrCode int

// 客户端错误， 注释是默认输出的错误消息
const (
	OK                   ErrCode = 0     //ok
	ErrRequest           ErrCode = 40000 //request error
	ErrInvalidParams     ErrCode = 40001 //request parameter error
	ErrFrequentlyRequest ErrCode = 40002 //requested too frequently

	ErrToken        ErrCode = 40101 //token missing or invalid
	ErrTokenExpired ErrCode = 40102 //token expiration
	ErrThirdSDK     ErrCode = 40103 //Third-party authorization failed
	ErrUserInvalid  ErrCode = 40104 //user invalid
	ErrUserPwd      ErrCode = 40105 //account or password invalid

	ErrBan         ErrCode = 40300 //ban
	ErrForbidden   ErrCode = 40301 //no access
	ErrRestriction ErrCode = 40302 //The operation is restricted, please contact customer service

	ErrRecordNotFound ErrCode = 40400 //resource does not exist

	ErrGoldNotEnough    ErrCode = 40500 //not enough
	ErrDiamondNotEnough ErrCode = 40501 //not enough
	ErrGoldTypClosed    ErrCode = 40502 //operation is closed
	ErrGoldTypNotExists ErrCode = 40503 //operation is fail
	ErrGoldTypModeError ErrCode = 40504 //operation mode is error
	ErrGoldTypError     ErrCode = 40505 //operation type is error
	ErrGoldIsZero       ErrCode = 40506 //operation number do not zero

	ErrMobilePhone    ErrCode = 41100 //The mobile phone number format is incorrect
	ErrInvalidCaptcha ErrCode = 41101 //Verification code error
)

// 服务端错误
const (
	ErrUnknown     ErrCode = 50000 //unknown error
	ErrMaintaining ErrCode = 50300 //System under maintenance
	ErrAlert       ErrCode = 99999 //alert msg
)
